Exceptions and Interrupts

There are three lectures here

Pages 325 to 332 and pages A-33 to A-40 in the book also talk about exceptions.

Each note begins with a time; "ca." in front of a time means that it is approximate.

Here's a link to the first lecture:

Lecture 1

6:30 -- Think of interrupts as the phone ringing to signal you to pick it up. Think of polling as building phones with no ringer; instead you go to the phone every now and then and pick it up to see if anyone is there.

Here's a link to the second lecture:

Lecture 2

14:00 -- start here

28:00 -- MARS does not try to simulate kernel mode

38:40 -- MIPS uses the syscall instruction for this. You've seen it used in MARS. Page A-44 has a list of syscalls that MARS can handle. Read the list and think of it as a mini operating system.

41:40 -- On MIPS, for some reason, dividing by zero does not cause an exception. A word access to a memory address that is not a multiple of 4 will cause an exception. Another example is trying to execute a bit pattern that is not a legal instruction.

45:30 -- On MIPS, that address is 0x8000-0180

Here's a link to the third lecture:

Lecture 3

37:30 -- He's putting together a list of software exceptions. We have a short list of them at 41:40 in lecture 2.